Zadig 文档
Zadig
教程
博客
论坛
关于
中文英文
Zadig
教程
博客
论坛
关于
Zadig v3.4
Loading...
     编辑文档
     反馈问题
     社区讨论

    本页导航

    测试

    # 执行测试任务

    请求

    POST /openapi/quality/testing/task
    
    1

    Body 参数说明

    参数名说明类型必填
    project_key项目标识string是
    test_name测试名称string是

    成功返回

    参数名类型描述
    task_idint测试任务 ID
    {
      "task_id": 27
    }
    
    1
    2
    3

    失败返回

    {
        "code": 500,
        "description": "mongo: no documents in result",
        "message": "Internal Error: "
    }
    
    1
    2
    3
    4
    5

    # 获取测试任务详情

    请求

    GET /openapi/quality/testing/:testName/task/:taskID?projectKey=<项目标识>
    
    1

    路径参数说明

    参数名类型描述必填
    testNamestring测试名称是
    taskIDint测试任务 ID是

    Query 参数说明

    参数名类型描述必填
    projectKeystring项目标识是

    成功返回说明

    参数名类型描述
    test_name测试名称string
    task_id测试任务 IDint
    creator创建者string
    create_time创建时间int
    start_time任务开始执行时间int
    end_time任务结束执行时间int
    status当前状态:
    created:测试任务已创建
    running:测试任务正在执行
    passed:测试任务执行通过
    skipped:测试任务未执行跳过
    failed:测试任务执行失败
    timeout:测试任务执行超时
    cancelled:测试任务已取消
    waiting:测试任务等待执行
    queued:测试任务已加入执行队列中
    string
    test_report测试报告Report

    Report 参数说明

    参数名类型描述
    test_total总测试用例数量int
    failure_total失败测试用例数量int
    success_total成功测试用例数量int
    skiped_total未执行测试用例数量int
    error_total错误测试用例数量int
    test_cases测试用例列表[]TestCase

    TestCase 参数说明

    参数名类型描述
    name用例名称string
    time用时,单位 秒int
    failure失败信息Message
    skipped未执行信息空结构体,该值为 null 代表此测试用例已执行,否则返回空结构体
    error错误信息Message

    Message 参数说明

    参数名类型描述
    message错误消息摘要string
    type类型string
    text错误具体内容string

    成功返回示例

    {
        "test_name": "test-demo",
        "task_id": 16,
        "creator": "cici",
        "create_time": 1689823467,
        "start_time": 1689823470,
        "end_time": 1689823491,
        "status": "passed",
        "test_report": {
            "test_total": 24,
            "failure_total": 0,
            "success_total": 24,
            "skiped_total": 0,
            "error_total": 0,
            "time": 13.872,
            "test_type": "",
            "name": "",
            "test_cases": [
                {
                    "name": "e2e Test Suites Scenario 1 - 现有项目的回归测试 被测试环境中存在一个叫做voting的项目 可以查看环境",
                    "time": 0.155922912,
                    "failure": null,
                    "skipped": null,
                    "error": null
                },
                
                {
                    "name": "e2e Test Suites Scenario 1 - 现有项目的回归测试 被测试环境中存在一个叫做voting的项目 可以查看Voting项目信息",
                    "time": 0.136967508,
                    "failure": null,
                    "skipped": null,
                    "error": null
                },
                {
                    "name": "e2e Test Suites Scenario 2 - onboarding的核心流程 经过系统的onboarding流程,自动生成了环境和一些工作流 成功的自动创建了环境和工作流,工作流可以被触发",
                    "time": 7.83081332,
                    "failure": null,
                    "skipped": null,
                    "error": null
                }
            ]
        }
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43

    失败返回

    {
        "code": 500,
        "description": "failed to get pipeline task from db, taskID:1, pipelineName:tt-job, err: mongo: no documents in result",
        "message": "Internal Error: "
    }
    
    1
    2
    3
    4
    5

    ← 构建代码扫描→

    资源
    教程
    论坛
    博客
    公司
    关于
    客户故事
    加入我们
    联系我们
    微信扫一扫
    hello@koderover.com

    © 2026 筑栈(上海)信息技术有限公司 沪 ICP 备 19000177 号 - 1

    •  跟随系统
    •  浅色模式
    •  深色模式
    •  阅读模式